package cn.edu.neusoft.wuguangsheng.flowerimpression.model;

import java.util.List;

import cn.edu.neusoft.wuguangsheng.flowerimpression.bean.UserOrderBean;
import cn.edu.neusoft.wuguangsheng.flowerimpression.iface.GetUserOrderListIface;
import cn.edu.neusoft.wuguangsheng.flowerimpression.listener.ListListener;
import cn.edu.neusoft.wuguangsheng.flowerimpression.service.AllService;
import retrofit2.Call;
import retrofit2.Retrofit;

public class GetUserOderListModel extends RetrofitBaseModel implements GetUserOrderListIface<UserOrderBean> {
    private AllService allService;
    private Retrofit retrofit;
    public GetUserOderListModel(){
        retrofit=getRetrofit();
        allService=getAllService();
    }
    @Override
    public void getUserOrderList(String userid, String orderflag, ListListener<UserOrderBean> listListener) {
        Call<List<UserOrderBean>> call = allService.getUserOrderList(userid,orderflag);
        callenqueueList(call,listListener);
    }

    @Override
    public void getUserAllOrderList(String userid, ListListener<UserOrderBean> listListener) {
        Call<List<UserOrderBean>> call = allService.getUserAllOrderList(userid);
        callenqueueList(call,listListener);
    }
}
